メインコンテンツへスキップ

All Posts

News bits

WebdriverIO v9 - WebDriver BiDi Support

WebDriver BiDi プロトコルをサポートした WebdriverIO v9 がリリースされた。

https://webdriver.io/blog/2024/08/15/webdriverio-v9-release/

これにより WebDriver BiDi をサポートしている環境であれば、今までよりも高速で安定したテストが可能になる。

#WebdriverIO とは

WebdriverIO はなぜか知名度が低いので説明をしておくと、WebdriverIO とは Puppeteer や Playwright、Cypress などと同等の機能を備えた E2E やコンポーネントテスト用のテスト自動化フレームワークであり、OpenJS Fundation がホストしているプロジェクトである。

#WebDriver BiDi とは

WebDriver BiDi は、W3C が策定した次世代ブラウザテスト自動化プロトコルである。 従来の手法の欠点を解消することを目的としており、つい先日、Chrome に加えて Firefox 129 と Puppeteer 23 で本番環境での利用が可能になった。

WebDriver BiDi production-ready in Firefox, Chrome and Puppeteer

W3C が従来のブラウザテスト自動化プロトコル WebDriver の拡張として策定を進めていた WebDriver BiDi が、Firefox、Chrome、Puppeteer で本番環境での利用が可能になった。

https://developer.chrome.com/blog/firefox-support-in-puppeteer-with-webdriver-bidi

従来のブラウザテスト自動化プロトコルには、いくつか問題がある。

  • Selenium などで利用される WebDriver はクロスブラウザ対応が容易な一方、Flaky になりやすく遅い。
  • Puppter や Playwright などが利用している Chrome DevTools Protocol(CDP)は高速であり低レベルな API を操作できるが、名前の通り本来 Chromium base のブラウザでしか動かず、Firefox や Safari にはパッチを当てて対応している。

WebDriver BiDi は、これらの問題を解決するために開発された。 WebDriver と CDP それぞれのメリットである容易なクロスブラウザ対応と高速な動作、低レベルな API の操作を全て備えている。

著者について

Hi there. I'm hrdtbs, a frontend expert and technical consultant. I started my career in the creative industry over 13 years ago, learning on the job as a 3DCG modeler and game engineer in the indie scene.

In 2015 I began working as a freelance web designer and engineer. I handled everything from design and development to operation and advertising, delivering comprehensive solutions for various clients.

In 2016 I joined Wemotion as CTO, where I built the engineering team from the ground up and led the development of core web and mobile applications for three years.

In 2019 I joined matsuri technologies as a Frontend Expert, and in 2020 I also began serving as a technical manager supporting streamers and content creators.

I'm so grateful to be working in this field, doing something that brings me so much joy. Thanks for stopping by.